﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Kopytko.GameBase;

namespace Kopytko
{
    /// <summary>
    /// Interaction logic for ChoosePlayersMessageBox.xaml
    /// </summary>
    public partial class ChoosePlayersMessageBox : MessageBoxBase
    {
        public PlayerType PlayerType { get; private set; }

        public ChoosePlayersMessageBox()
        {
            InitializeComponent();
            BeforeClose += new EventHandler(ChoosePlayersMessageBox_BeforeClose);
        }

        void ChoosePlayersMessageBox_BeforeClose(object sender, EventArgs e)
        {
            if (rb_human.IsChecked.Value)
            {
                PlayerType = PlayerType.Human;
            }
            else if (rb_computer.IsChecked.Value)
            {

                PlayerType = PlayerType.Computer;
            }
            else if (rb_remote.IsChecked.Value)
            {
                PlayerType = PlayerType.Remote;
            }

        }

        
    }
}
